var sprintf = require('sprintf-js').sprintf;

String.prototype.replaceAll = function(findText, repText) {
      let regExp = new RegExp(findText, 'g');
      return this.replace(regExp, repText);
}

String.prototype.trim = function() {
      return this.replace(/^\s+|\s+$/g, '');
}

String.prototype.addslashes = function() {
      return this.replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0');
}

String.prototype.upper = function() {
      return this.toUpperCase();
}

String.prototype.lower = function() {
      return this.toLowerCase();
}